color value function colorValue (min) {return Math. floor (Math. random () * 255 + min);} function createColorStyle (r, g, B) {return "rgba (" + r + "," + g + ", "+ B +", 1) ";}// mixed color function mixConnect (c1, r1, c2, r2) of two circular Particles) {// return (c1 * r1 + c2 * r2)/(r1 + r2) ;}; // function lineColor (dot1, dot2) of the generated line) {// obtain the color of a specific circle and calculate var color1 = dot1.color, color2 =
It seems a bit of a headache, but it's easier to figure out the rules:1. The version number is different from the current number, then compare, return-1 or 12. The version number is the same as the current number, then the subsequent number is compared. such as 1.1:1 large, but 1.0 and 1 are the same; but 1.0.1 is bigger than 1.It's not too long to write a good code: D.Class Solution {Public:int compareversion (string version1, String version2) {while (Version1! = "" | | Version2 = "") {size_t d
Title, we will achieve this effect.The first is the HTML5 part:Then we write a simple CSS that makes the hover change the background color of the dots.*{margin:0px;padding:0px;} div#figure_div{position:relative;width:800px;height:500px;} div#dots_div{position:absolute;/*width:100px;*/height:20px;left:352px;bottom:10px;} Div#figure_div li{width:16px;height:16px;border:1px solid #666;d isplay:inline-block;border-radius:8px;} Div#figure_div li:hover{background-color: #EAEA06;} Div#figure_div Img{wi
points, but this can be initialized at the beginning of the good, because this value will not change, there is no need to repeat the calculation.The two sets of point coordinates are obtained, then the matrix is passed into the method, the clip is processed, and the picture is drawn, and the entire rendering process is completed./** * Canvas Rendering*/ functionrender () {Ctx.clearrect (0,0, Canvas.width,canvas.height); varNdots = Rectsplit (count, Dots[0], dots[1], dots[2], dots[3]); Ndots.
Today, I groped for the CSS3 animation, mainly compatible with the WebKit engine. Here is my simple implementation of a loop playing home in the animation, the code is as follows:DOCTYPE HTML>HTML> Head> MetaCharSet= "Utf-8"> title>Chasing Dottitle> styletype= "Text/css">. Spiner{//define containermargin:100px Auto;width:40px;Height:40px;position:relative;text-align:Center;-webkit-animation:rotate 2s infinite linear;//Container load rotation animation, time 2s, infinite l
Page number navigation, first look at the display effect:
Algorithm Requirements:
1, the page is less than or equal to 1 o'clock does not show;
2, the number of pages greater than 10 o'clock, automatically shortened.
The specific code is as follows:
Copy Code code as follows:
Get page Navigation
private string gepagenavgation (int intpageindex, int intpagecount, string strurl)
{
StringBuilder sb = new StringBuilder ("if (Intpagecount > 1)
{
Page number Display
if (Intpageind
); return _ size. toFixed (2) + ''+ sizes [I];}
At present, there is no good solution.The wave effect is invalid in some Android models.
Because my animation effects use css3, it is easy to think that it is caused by incompatibility of browser styles. In fact, it is specified by adding the-webkit-prefix. Because many mobile browsers use webkit kernels.
HTML
Css style:
. Portrait-clockin {width: 3rem; height: 3rem; margin: 0 15px 0px 0px ;}. fr {float: right;}/* water ripple effect during work
("Myclock[" + This. cid+ "']._running_ ();", 1000); } clock.prototype._running_=function(){ This. Secondhand.gonext (); This. Minutehand.gonext (); This. Hourhand.gonext (); }Third, call //Radius var r= 100; // origin Point var = [Dot2]; New Clock (Dot2, R). Init (). Start ();PS: Other methods that the above script relies on can be obtained by viewing the sour
used
If Isinstance (Cell.value, Unicode): Break
such as the statement processing.
Win under the CMD does not seem very good set with the Utf-8 code page, if it is Simplified Chinese words can be used 936 (GBK), print will automatically convert from Unicode to GBK output to the terminal.
Some small functions to help with Chinese problemsThe table I work with has some characters that go beyond the GBK range, and when I need to print out some information to monitor the progress of the process
cell.value
continue
And the like, to judge first.
If you have a lot of noise in the Excel file that you want to work with, such as when you expect a cell to be a time, some of the table's data may be strings, and you can use
If Isinstance (Cell.value, Unicode): Break
such as the statement processing.
Win under the CMD seems not very good to set the code page with Utf-8, if it is Simplified Chinese words can be used 936 (GBK), print automatically from Unicode to GBK ou
1. Create the Word template file person. Dot2. Create a web application and add Microsoft. Office. InterOP. Word reference.3. Related sample code======================================1. Create the Word template file person. DotUse bookmarks to mark the filling position of related fields
2. Create a web application and add Microsoft. Office. InterOP. Word reference.For more information, seeHttp://www.microsoft.com/china/msdn/library/office/office/Offic
CSS code:
. list{
margin:0px 10px 20px;
Text-align:left
}
. List ul{
list-style-type:none;
margin:0px;
padding:0px
}
. List li{
background:url (/news/images/line.gif) Repeat-x bottom;
/* The dotted line at the bottom of the list *
/width:100%;
List Li a{
color: #777777;
Display:block;
padding:6px 0px 4px 15px;
Background:url (/news/images/dot.gif) no-repeat 0 6px;
/* The arrow picture on the left of the list/
}
. list Li span{
float:right;/* to float the span element to the r
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.